<?php

use Doctrine\ORM\Mapping\ClassMetadataInfo;

$metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_NONE);
$metadata->setPrimaryTable(array(
   'name' => 'margin_recharge',
   'uniqueConstraints' => 
   array(
   'uuid' => 
   array(
    'columns' => 
    array(
    0 => 'uuid',
    ),
   ),
   ),
   'indexes' => 
   array(
   'user_id' => 
   array(
    'columns' => 
    array(
    0 => 'user_id',
    ),
   ),
   ),
  ));
$metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT);
$metadata->mapField(array(
   'fieldName' => 'id',
   'columnName' => 'id',
   'type' => 'integer',
   'nullable' => false,
   'options' => 
   array(
   'unsigned' => true,
   ),
   'id' => true,
  ));
$metadata->mapField(array(
   'fieldName' => 'uuid',
   'columnName' => 'uuid',
   'type' => 'string',
   'nullable' => false,
   'length' => 40,
   'options' => 
   array(
   'fixed' => true,
   'comment' => '唯一标识',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'userId',
   'columnName' => 'user_id',
   'type' => 'integer',
   'nullable' => false,
   'options' => 
   array(
   'unsigned' => true,
   'comment' => '用户ID',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'realname',
   'columnName' => 'realname',
   'type' => 'string',
   'nullable' => false,
   'length' => 10,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '真实姓名',
   'default' => '',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'phone',
   'columnName' => 'phone',
   'type' => 'string',
   'nullable' => false,
   'length' => 40,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '手机号',
   'default' => '',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'idNumber',
   'columnName' => 'id_number',
   'type' => 'string',
   'nullable' => false,
   'length' => 18,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '身份证号',
   'default' => '',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'orderId',
   'columnName' => 'order_id',
   'type' => 'string',
   'nullable' => false,
   'length' => 20,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '订单id',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'amount',
   'columnName' => 'amount',
   'type' => 'decimal',
   'nullable' => false,
   'precision' => 14,
   'scale' => 2,
   'options' => 
   array(
   'comment' => '充值金额',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'payChannel',
   'columnName' => 'pay_channel',
   'type' => 'string',
   'nullable' => false,
   'length' => 20,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '支付渠道',
   'default' => '',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'bankAccount',
   'columnName' => 'bank_account',
   'type' => 'string',
   'nullable' => false,
   'length' => 20,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '银行卡号',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'bankName',
   'columnName' => 'bank_name',
   'type' => 'string',
   'nullable' => false,
   'length' => 30,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '银行名称',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'isCashBuy',
   'columnName' => 'is_cash_buy',
   'type' => 'boolean',
   'nullable' => false,
   'options' => 
   array(
   'comment' => '是否现金支付',
   'default' => '0',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'errorMessage',
   'columnName' => 'error_message',
   'type' => 'string',
   'nullable' => false,
   'length' => 100,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '错误提示',
   'default' => '',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'status',
   'columnName' => 'status',
   'type' => 'smallint',
   'nullable' => false,
   'options' => 
   array(
   'unsigned' => false,
   'comment' => '状态 100处理中 200成功 400失败',
   'default' => '100',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'remake',
   'columnName' => 'remake',
   'type' => 'string',
   'nullable' => false,
   'length' => 250,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '备注',
   'default' => '',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'clientIp',
   'columnName' => 'client_ip',
   'type' => 'string',
   'nullable' => false,
   'length' => 15,
   'options' => 
   array(
   'fixed' => false,
   'comment' => '用户ip',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'createTime',
   'columnName' => 'create_time',
   'type' => 'datetime',
   'nullable' => false,
   'options' => 
   array(
   'comment' => '创建时间',
   ),
  ));
$metadata->mapField(array(
   'fieldName' => 'updateTime',
   'columnName' => 'update_time',
   'type' => 'datetime',
   'nullable' => true,
   'options' => 
   array(
   'comment' => '更新时间',
   ),
  ));
$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_IDENTITY);